www.mxdraw.com
|
返回样条线的拟合数据
[helpstring("method GetFitData")] HRESULT GetFitData([out] IMxDrawPoints** pPoints, [out] LONG* degree, [out] DOUBLE* fitTolerance, [out] VARIANT_BOOL* tangentsExist, [out] IMxDrawVector3d** startTangent, [out] IMxDrawVector3d** endTangent);
参数 |
说明 |
[out] IMxDrawPoints** pPoints |
返回样条线拟合点数组 |
[out] LONG* degree |
暂没有使用 |
[out] DOUBLE* fitTolerance |
暂没有使用 |
[out] VARIANT_BOOL* tangentsExist |
暂没有使用 |
[out] IMxDrawVector3d** startTangent |
样条线开始位置处的切线向量 |
[out] IMxDrawVector3d** endTangent |
样条线结束位置处的切线向量 |
例如: C#
MxDrawEntity ent = (MxDrawEntity)axMxDrawX1.GetEntity("选择样条线"); if (ent == null) return; if (ent is MxDrawSpline) { MxDrawSpline spl = (MxDrawSpline)ent; MxDrawPoints fitPoints; int dgree = 3; double fitTol = 0.0001; bool tangentsExit = false; MxDrawVector3d sT, eT; spl.GetFitData(out fitPoints, out dgree, out fitTol, out tangentsExit, out sT, out eT); for (int i = 0; i < fitPoints.Count; i++) { MxDrawPoint pt = fitPoints.Item(i); MessageBox.Show(pt.x.ToString() + "," + pt.y.ToString()); } }